<pre class="docs-method-signature"><code>rect.snapToGrid(gx, gy)</code></pre>
<p>Adjust the position and dimensions of the rectangle such that its edges are on the nearest increment of <code>gx</code> on the x-axis and <code>gy</code> on the y-axis.</p>
